Approaches for amalgamating disparate software tools

ABSTRACT

Systems and methods are provided for obtaining one or more source code files that correspond to a software program. At least one first software package that is separately executable from the software program is obtained, the first software package including one or more source code files. At least one first callable library for the first software package and at least one first invocation mechanism for calling the first callable library are generated. A composite software program that is capable of invoking at least the software program and the first callable library for the first software package using the first invocation mechanism is generated.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. application Ser.No. 16/053,437, filed Aug. 2, 2018, which is a continuation of U.S.application Ser. No. 15/343,096, filed Nov. 3, 2016, now U.S. Pat. No.10,042,620, the contents of each of which are incorporated by referencein their entirety into the present disclosure.

FIELD OF THE INVENTION

This disclosure relates to approaches for developing software tools.

BACKGROUND

Under conventional approaches, software developers may rely on varioussoftware packages, e.g., development tools, to test and/or validatetheir software. These existing development tools may be utilized, forexample, to format, check, test, build, distribute, and/or publishsource code. In some instances, each software package may be a separatestandalone executable. Depending on the development environment, havingto separately obtain, compile and execute such packages can becumbersome and inefficient.

SUMMARY

Various embodiments of the present disclosure can include systems,methods, and non-transitory computer readable media configured to obtainone or more source code files that correspond to a software program. Atleast one first software package that is separately executable from thesoftware program is obtained, the first software package including oneor more source code files. At least one first callable library for thefirst software package and at least one first invocation mechanism forcalling the first callable library are generated. A composite softwareprogram that is capable of invoking at least the software program andthe first callable library for the first software package using thefirst invocation mechanism is generated.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to cause the composite software program toinvoke the first callable library for the first software package.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to execute the composite software programusing a command-line argument that references the first invocationmechanism for the first software package.

In some embodiments, the first callable library is executed in aseparate sub-process with a separate execution stack.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to obtain at least one second softwarepackage that is separately executable from the software program, thesecond software package including one or more source code files;generate at least one second callable library for the second softwarepackage and at least one second invocation mechanism for calling thesecond callable library; and generate a new composite software programthat is capable of invoking at least the software program, the firstcallable library for the first software package using the firstinvocation mechanism, and the second callable library for the secondsoftware package using the second invocation mechanism.

In some embodiments, the new composite software program is capable ofinvoking functionalities of the software program, the first softwarepackage, and the second software package.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to determine that the first softwarepackage and the second software package both import a package thatutilizes shared state such as global variables; create a first copy ofthe package for the first software package; modify the source code filesfor the first software package to use the first copy of the package;create a second copy of the package for the second software package; andmodify the source code files for the second software package to use thesecond copy of the package.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to automatically rewrite the source codefiles corresponding to the first software package to be the firstcallable library.

In some embodiments, at least the source code file that includes a mainfunction for the first software package is rewritten to be callable as aseparate non-main library function.

In some embodiments, the systems, methods, and non-transitory computerreadable media are configured to embed the first invocation mechanism inthe composite software program.

These and other features of the systems, methods, and non-transitorycomputer readable media disclosed herein, as well as the methods ofoperation and functions of the related elements of structure and thecombination of parts and economies of manufacture, will become moreapparent upon consideration of the following description and theappended claims with reference to the accompanying drawings, all ofwhich form a part of this specification, wherein like reference numeralsdesignate corresponding parts in the various figures. It is to beexpressly understood, however, that the drawings are for purposes ofillustration and description only and are not intended as a definitionof the limits of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

Certain features of various embodiments of the present technology areset forth with particularity in the appended claims. A betterunderstanding of the features and advantages of the technology will beobtained by reference to the following detailed description that setsforth illustrative embodiments, in which the principles of the inventionare utilized, and the accompanying drawings of which:

FIG. 1 illustrates an example environment for generating compositeprograms, in accordance with various embodiments.

FIGS. 2A-B illustrate example diagrams of generating a compositesoftware program, in accordance with various embodiments.

FIG. 3 illustrates an example diagram of invoking an amalgamatedpackage, in accordance with various embodiments.

FIG. 4 illustrates an example diagram of generating a composite softwareprogram with multiple-levels of composition, in accordance with variousembodiments.

FIG. 5 illustrates a flowchart of an example method, in accordance withvarious embodiments.

FIG. 6 illustrates a block diagram of an example computer system inwhich any of the embodiments described herein may be implemented.

DETAILED DESCRIPTION

Under conventional approaches, software developers may rely on varioussoftware packages (e.g., development tools) that can be individuallycompiled and executed. In one example, a developer using the Goprogramming language may utilize the errcheck and deadcode packages toidentify errors in a software program being developed on a computingsystem. In this example, the developer can separately install thesepackages on the computing system. For example, the developer can run the“go get” command along with a location (e.g., directory, uniformresource locator, etc.) from which the package being installed isavailable. Once installed, these packages can individually be executedto perform various operations with respect to the software program beingdeveloped.

This separate installation of packages may not be ideal for variousreasons. Thus, in some instances, the developer may want to have theability to call these packages directly from the software program beingdeveloped. One conventional approach to enabling such functionality isto embed the packages as binaries (or resources) into the source code ofthe software program being developed. The binaries for these packageswould then be included in the compiled software program's source code.When the software program is executed and a package's functionality isneeded, the software program typically must be able to write thepackage's binary to a directory in a data store and also have the properpermission to execute the binary file from the directory. Depending onthe computing environment, such permissions may not always be available.Further, having separate binaries for each package can requireadditional storage space which may not be ideal. Another conventionalapproach involves embedding the source code of a package into thesoftware program being developed. In this approach, when the softwareprogram is executed and the package's functionality is needed, theembedded source code is written to a directory, the source code iscompiled into an executable, and the package is then run using theexecutable. Again, this approach requires the software program to havepermissions (e.g., read, write, execute permissions) that may notnecessarily be available.

A claimed solution rooted in computer technology overcomes problemsspecifically arising in the realm of computer technology. In variousembodiments, a computing system can generate a composite (oramalgamated) software program that incorporates the variousfunctionality provided by individual packages (e.g., errcheck, deadcode,etc.). The composite software program can provide the ability to invokethe various packages without having the drawbacks that typically arisein conventional approaches. In some embodiments, when incorporating apackage into the composite software program, an amalgamation softwareapplication can be configured to automatically rewrite the source codeof the package, including any dependencies, as a callable library (e.g.,rewriting the main function of the package as a library). Theamalgamation software application can also generate an invocationmechanism for calling the library. This invocation mechanism can beembedded into the composite software program and can be used to invokethe incorporated package when needed. When a user instructs thecomposite software program to run the package (e.g., using acommand-line invocation signal (e.g., “./composite-program_errcheck”),the composite software program can call the invocation mechanism for thepackage (e.g., errcheck), which calls the respective library for thepackage. In various embodiments, the invocation mechanism causes thecomposite software program to run and perform the functionality of thepackage within a separate process. The package can run in this separateprocess using an execution stack that has been configured so that, fromthe package's perspective, the package is running as a standaloneexecutable. As such, the package can run and exit in this separateprocess without adversely affecting the execution of the compositesoftware program. Although the examples in this specification referencethe Go programming language, the approaches described herein can readilybe adapted to generate composite software programs written in anycompiled programming language.

FIG. 1 illustrates an example environment 100 for generating compositesoftware programs, in accordance with various embodiments. The exampleenvironment 100 can include at least one computing system 102 thatincludes one or more processors and memory. The processors can beconfigured to perform various operations by interpretingmachine-readable instructions. As shown in FIG. 1, in some embodiments,the computing system 102 can include an amalgamation engine 104 thatincludes a package engine 106, a library generation engine 108, a sharedlibrary engine 110, and an invocation engine 112. The amalgamationengine 104 can be executed by the processor(s) of the computing system102 to perform various operations including those described in referenceto the package engine 106, the library generation engine 108, the sharedlibrary engine 110, and the invocation engine 112. The environment 100may also include a data store 122 that is accessible to the computingsystem 102. In some embodiments, the data store 122 may include varioussoftware packages (e.g., Go packages) that are available forinstallation and execution. In various embodiments, the amalgamationengine 104 can be configured to generate composite software programs. Insome embodiments, a composite software program is a software programthat is capable of invoking the functionality of various softwarepackages that are otherwise individually executable in addition toperforming the various operations that the software program has beenconfigured to perform. In some embodiments, a package is any softwarepackage (or program) having its own accessible set of source code.

In various embodiments, the package engine 106 can be configured toobtain various packages to be amalgamated (or re-packaged) into asoftware program for purposes of generating a composite softwareprogram. Once a package has been amalgamated, the composite softwareprogram can be instructed to invoke the functionality of the amalgamatedpackage (e.g., sub-package) without having to separately call orgenerate a corresponding executable for the package. As mentioned, suchpackages may reside on the data store 122. In some instances, thesepackages may be obtained over a network, e.g., the Internet, fromvarious software repositories. For example, the software program mayrely on the functionality of a first package (e.g., errcheck) and asecond package (e.g., deadcode). In this example, the package engine 106can be configured (or instructed) to obtain the first package and thesecond package. Each package and its corresponding source code (anddependencies, e.g., libraries) can be stored in a respective directory(e.g., on the data store 122) within the directory corresponding to thesoftware program for which the packages are being amalgamated. Ingeneral, each package will have its own directory structure asidentified by a respective import path. This directory structure caninclude various files (e.g., source code files) such as a respectivemain package that includes a corresponding main function for thepackage. This main function of a package is typically called when thepackage is executed individually as a standalone program.

In some embodiments, the library generation engine 108 is configured toprogrammatically rewrite a main package corresponding to a package beingamalgamated into a corresponding library package. In such embodiments,the library generation engine 108 can automatically rewrite the mainfunction of the package to be exported and also be callable publically(e.g., as a non-main function). For example, the “main” function of thepackage can be rewritten to be callable as “AmalgamatedMain”. As aresult, the respective source code for each package being amalgamatedfor a composite software program will be rewritten as a separatecallable library package.

In some instances, the software program for which packages are beingamalgamated may import instances of packages that are known to utilizeglobal state variables. One example package that uses global variablesis the Go “flag” package. In general, a first package can utilize and/ormodify a set of global state variables that are provided by an importedpackage (e.g., the flag package) to function properly. A second packagethat imports the same package will rely on the same global statevariables to function properly. In some instances, both the first andsecond packages can be amalgamated for use by a composite softwareprogram. However, in this example, the composite software program runsthe risk of crashing, or producing other errors, when invoking thefunctionality of the first package and the second package since both thefirst package and the second package rely on the same set of globalvariables. To address this risk, in various embodiments, the sharedlibrary engine 110 can identify imported packages that utilize sharedglobal state variables. Once identified, the shared library engine 110can create a respective copy of the imported package that utilizesshared global state variables for each package that imports the package.For example, if both the first package and the second package import theGo “flag” package (which utilizes global variables), then a separatecopy of the flag package can be created for the first package andanother separate copy of the flag package can be created for the secondpackage. The shared library engine 110 can also modify the rewrittencode for packages (e.g., the first and second packages) beingamalgamated so that the packages utilize their own copy of the importedpackage. For example, the shared library engine 110 can rewrite the codefor the first package to utilize a first copy of the flag package.Similarly, the shared library engine 110 can rewrite the code for thesecond package to utilize a second copy of the flag package.

In some embodiments, the library generation engine 108 also creates anew library file that provides an entry point for calling any of theamalgamated packages and/or sub-composite software programs. In suchembodiments, only this library file is exported for use by the compositesoftware program. The composite software program can use the libraryfile to call any of the amalgamated packages. As a result, the libraryfile shields the state of the amalgamated packages from other packages.

In various embodiments, the invocation engine 112 is configured togenerate respective invocation mechanisms for the amalgamated packages.For example, invoking an amalgamated package through a compositesoftware program without an invocation mechanism will typically causethe amalgamated package to run in-process. In this example, the invokedamalgamated package may perform operations that adversely affect theoperation of the composite software program. In one example, theamalgamated package may call an exit function (e.g., “os.Exit”) whichcauses the composite software program to exit. In another example, theamalgamated package may modify global variables (e.g., “os.Args”) whichmay cause the composite software program to crash. Thus, in variousembodiments, the invocation engine 112 is configured to generaterespective invocation mechanisms for the amalgamated packages that allowthe amalgamated packages to be invoked safely without adverselyaffecting the operation of the composite software program.

In some embodiments, the invocation engine 112 configures the compositesoftware program to be provided with a special invocation signal whenexecuted. In such embodiments, this special invocation signal can beused to instruct the composite software program to immediately re-invokeitself in a manner that executes the logic of an amalgamated package. Insome embodiments, when invoking an amalgamated package as described, thecomposite software program runs the amalgamated package in a separateprocess using an execution stack that has been configured so that, fromthe amalgamated package's perspective, the amalgamated package isrunning as a standalone executable.

For example, in some embodiments, a composite software program having anexecutable named “essayChecker” can be invoked from the command-line(e.g., “./essayChecker”). Further, any parameters, or arguments, to bepassed to the composite software program can also be provided throughthe command-line (e.g., “./essayChecker myEssay.txt”). In this example,the composite software program may be configured to invoke anamalgamated spell checking package, e.g., “spellCheck”, as follows“./essayChecker__spellCheck”. Here, the invocation signal “__” (twounderscores) is followed by the name of the amalgamated package“spellCheck” to be invoked. Similarly, additional parameters, orarguments, can be provided to the amalgamated package through thecommand-line, e.g., “./essayChecker__spellCheck-british-english=truemyEssay.txt”. In this example, the arguments “-british-engline=true” and“myEssay.txt” can be utilized by the amalgamated package when performingvarious operations. In some embodiments, the composite software program(e.g., “essayChecker”) splices out the invocation signal (e.g.,“_spellCheck”) so that the command-line arguments match the command-linearguments that would normally be expected by the amalgamated packagebeing invoked (e.g., “./essayChecker-british-english=true myEssay.txt”).These modified command-line arguments can be provided to the libraryfunction (e.g., the rewritten main function) that was generated for theamalgamated package, as described above. The library function performsthe functionality of the amalgamated package (e.g., “spellCheck”) byrunning in a separate sub-process. As a result, any operations performedby the library function (e.g., “os.Exit”) will only impact thesub-process. Once invocation of the amalgamated package (e.g., libraryfunction of the amalgamated package) is complete, the composite softwareprogram can process the output from the amalgamated package and proceedaccordingly.

As described, the amalgamation engine 104 produces a set of source codefiles that are automatically (or programmatically) generated. In someembodiments, these source code files correspond to a software programand various amalgamated packages. In such embodiments, these source codefiles can be compiled into a single executable, e.g., a compositesoftware program, that can invoke the functionality of the variouspackages without requiring separate, standalone executables for each ofthose packages. In general, the overall size of the composite softwareprogram will typically be much more compact in comparison to havingstandalone executables for the packages.

In various embodiments, the amalgamation engine 104 is capable ofgenerating composite software programs that support multiple levels ofcomposition using the approaches described above. For example, a firstcomposite software program (e.g., “dictionary”) may be capable ofinvoking a first amalgamated package (e.g., “medical-dict”) and a secondamalgamated package (e.g., “law-reference”). Here, the first compositesoftware program can be run as a standalone program (e.g.,“./dictionary”) and/or be used to invoke an amalgamated package (e.g.,“./dictionary medical-dict look-up arthritis”. Similarly, a secondcomposite software program (e.g., “thesaurus”) may be capable ofinvoking a third amalgamated package (e.g., “med-thesaurus”) and afourth amalgamated package (e.g., “law-reference”). In this example, athird composite software program (e.g., “omni-reference”) can begenerated to support invocation of the first composite software program(e.g., “dictionary”) and the second composite software program (e.g.,“thesaurus”). In various embodiments, embedded composite softwareprograms (e.g., “dictionary” or “thesaurus”) can be called using arunner. In such embodiments, the runner can namespace based on theamalgamated packages (i.e., generated libraries). As a result, anembedded composite software program can be invoked using a separateinvocation signal. For example, the composite software program“omni-reference” can invoke the sub-composite software program“dictionary” as follows: “./omni-reference_dictionary_law-referencelook-up negligence”. In this example, the sub-composite software program“dictionary” is invoked using the signal “_dictionary” and theamalgamated package “law-reference” is invoked using a separate signal“_law-reference”.

FIGS. 2A-B illustrate example diagrams of generating a compositesoftware program, in accordance with various embodiments. For example,FIG. 2A illustrates an example standalone software program 202 (e.g.,“myProgram”) that relies on a standalone first package 204 (e.g.,“errcheck”) and a standalone second package 206 (e.g., “deadcode”) forperforming various operations. In this example, the software program 202can individually install (e.g., download, compile, etc.) the firstpackage 204 and the second package 206. Once installed, the firstpackage 204 and/or the second package 206 will have correspondingexecutable files that can individually be executed by the softwareprogram 202 to perform various operations. As mentioned, such anapproach may not be ideal for various reasons. Thus, in variousembodiments, a composite software program can be generated toincorporate the functionality of the software program 202 along with thefunctionalities of the first package 204 and the second package 206. Forexample, FIG. 2B illustrates a standalone composite software program 212that includes the functionality of the software program 202 as well asboth the first package 204 and the second package 206. In this example,the first package 204 has been amalgamated using the approachesdescribed above to be included in the composite software program 212 asthe amalgamated first package 214. Similarly, the second package 206 hasbeen amalgamated to be included in the composite software program 212 asthe amalgamated second package 216. In various embodiments, therespective invocation mechanism of the amalgamated first package 214 canbe used to invoke operations that would typically be performed by astandalone executable corresponding to the first package 204. Similarly,the respective invocation mechanism of the amalgamated second package216 can be used to invoke operations that would typically be performedby a standalone executable corresponding to the second package 206.

FIG. 3 illustrates an example diagram of invoking an amalgamatedpackage, in accordance with various embodiments. As shown, the exampleof FIG. 3 includes a composite software program 302 that includes thefunctionality of a software program as well as both an amalgamated firstpackage 304 and an amalgamated second package 306. In variousembodiments, the composite software package 302 is configured torecognize and process any invocation signals that are provided from thecommand-line. For example, the composite software package 302 can beinstructed to invoke the amalgamated first package 304 by running thecomposite software package 302 with an invocation signal that referencesthe amalgamated first package 304. In the example of FIG. 3, thecomposite software package 302 processes the invocation signal todetermine that the amalgamated first package 304 is being invoked. Basedon the invocation signal, the composite software program 302 can thenrun within a sub-process 310 in a manner such that the behavior of thecomposite software program 302 is identical to invoking the amalgamatedfirst package 304 as a standalone executable.

FIG. 4 illustrates an example diagram of generating a composite softwareprogram with multiple-levels of composition, in accordance with variousembodiments. As shown, the example of FIG. 4 includes a compositesoftware program 402 that includes the functionality of a firstsub-composite software program 404 and a second sub-composite softwareprogram 414. The first sub-composite software program 404 includes anamalgamated first package 406 and an amalgamated second package 408.Similarly, the second sub-composite software program 414 includes anamalgamated third package 416 and an amalgamated fourth package 418. Asmentioned, in various embodiments, the composite software package 402 isconfigured to recognize and process any invocation signals that areprovided from the command-line for purposes of invoking a sub-compositesoftware program and/or any amalgamated packages within sub-compositesoftware programs.

For example, the composite software program 402 can be invoked tospecify the execution of the amalgamated first package 406 (e.g., usingan invocation signal that references the first sub-composite program 404and the amalgamated first package 406). When the composite softwareprogram 402 is invoked in a separate sub-process, the composite softwarepackage 402 passes control to the invocation engine of the firstsub-composite software program 404, which then invokes the functionalityof the amalgamated first package 406. Such chaining of invocationmechanisms (or engines) allows this multi-level embedding. As shown, theinvocation of the amalgamated first package 406 can involve thecomposite software program 402 invoking itself in a separate sub-process420 so that the first sub-composite program 404 is invoked to executethe amalgamated first package 406. This same process can be extendedarbitrarily, and the design of the invocation engine can ensure thatonly a single sub-process is required regardless of the number ofcompositions.

FIG. 5 illustrates a flowchart of an example method 500, according tovarious embodiments of the present disclosure. The method 500 may beimplemented in various environments including, for example, theenvironment 100 of FIG. 1. The operations of method 500 presented beloware intended to be illustrative. Depending on the implementation, theexample method 500 may include additional, fewer, or alternative stepsperformed in various orders or in parallel. The example method 500 maybe implemented in various computing systems or devices including one ormore processors.

At block 502, one or more source code files that correspond to asoftware program are obtained. At block 504, at least one first softwarepackage that is separately executable from the software program isobtained. The first software package can include one or more source codefiles. At block 506, at least one first callable library for the firstsoftware package and at least one first invocation mechanism for callingthe first callable library are generated. At block 508, a compositesoftware program that is capable of invoking at least the softwareprogram and the first callable library for the first software packageusing the first invocation mechanism is generated.

Hardware Implementation

The techniques described herein are implemented by one or morespecial-purpose computing devices. The special-purpose computing devicesmay be hard-wired to perform the techniques, or may include circuitry ordigital electronic devices such as one or more application-specificintegrated circuits (ASICs) or field programmable gate arrays (FPGAs)that are persistently programmed to perform the techniques, or mayinclude one or more hardware processors programmed to perform thetechniques pursuant to program instructions in firmware, memory, otherstorage, or a combination. Such special-purpose computing devices mayalso combine custom hard-wired logic, ASICs, or FPGAs with customprogramming to accomplish the techniques. The special-purpose computingdevices may be desktop computer systems, server computer systems,portable computer systems, handheld devices, networking devices or anyother device or combination of devices that incorporate hard-wiredand/or program logic to implement the techniques.

Computing device(s) are generally controlled and coordinated byoperating system software, such as iOS, Android, Chrome OS, Windows XP,Windows Vista, Windows 7, Windows 8, Windows Server, Windows CE, Unix,Linux, SunOS, Solaris, iOS, Blackberry OS, VxWorks, or other compatibleoperating systems. In other embodiments, the computing device may becontrolled by a proprietary operating system. Conventional operatingsystems control and schedule computer processes for execution, performmemory management, provide file system, networking, I/O services, andprovide a user interface functionality, such as a graphical userinterface (“GUI”), among other things.

FIG. 6 is a block diagram that illustrates a computer system 600 uponwhich any of the embodiments described herein may be implemented. Thecomputer system 600 includes a bus 602 or other communication mechanismfor communicating information, one or more hardware processors 604coupled with bus 602 for processing information. Hardware processor(s)604 may be, for example, one or more general purpose microprocessors.

The computer system 600 also includes a main memory 606, such as arandom access memory (RAM), cache and/or other dynamic storage devices,coupled to bus 602 for storing information and instructions to beexecuted by processor 604. Main memory 606 also may be used for storingtemporary variables or other intermediate information during executionof instructions to be executed by processor 604. Such instructions, whenstored in storage media accessible to processor 604, render computersystem 600 into a special-purpose machine that is customized to performthe operations specified in the instructions.

The computer system 600 further includes a read only memory (ROM) 608 orother static storage device coupled to bus 602 for storing staticinformation and instructions for processor 604. A storage device 610,such as a magnetic disk, optical disk, or USB thumb drive (Flash drive),etc., is provided and coupled to bus 602 for storing information andinstructions.

The computer system 600 may be coupled via bus 602 to a display 612,such as a cathode ray tube (CRT) or LCD display (or touch screen), fordisplaying information to a computer user. An input device 614,including alphanumeric and other keys, is coupled to bus 602 forcommunicating information and command selections to processor 604.Another type of user input device is cursor control 616, such as amouse, a trackball, or cursor direction keys for communicating directioninformation and command selections to processor 604 and for controllingcursor movement on display 612. This input device typically has twodegrees of freedom in two axes, a first axis (e.g., x) and a second axis(e.g., y), that allows the device to specify positions in a plane. Insome embodiments, the same direction information and command selectionsas cursor control may be implemented via receiving touches on a touchscreen without a cursor.

The computing system 600 may include a user interface module toimplement a GUI that may be stored in a mass storage device asexecutable software codes that are executed by the computing device(s).This and other modules may include, by way of example, components, suchas software components, object-oriented software components, classcomponents and task components, processes, functions, attributes,procedures, subroutines, segments of program code, drivers, firmware,microcode, circuitry, data, databases, data structures, tables, arrays,and variables.

In general, the word “module,” as used herein, refers to logic embodiedin hardware or firmware, or to a collection of software instructions,possibly having entry and exit points, written in a programminglanguage, such as, for example, Java, C or C++. A software module may becompiled and linked into an executable program, installed in a dynamiclink library, or may be written in an interpreted programming languagesuch as, for example, BASIC, Perl, or Python. It will be appreciatedthat software modules may be callable from other modules or fromthemselves, and/or may be invoked in response to detected events orinterrupts. Software modules configured for execution on computingdevices may be provided on a computer readable medium, such as a compactdisc, digital video disc, flash drive, magnetic disc, or any othertangible medium, or as a digital download (and may be originally storedin a compressed or installable format that requires installation,decompression or decryption prior to execution). Such software code maybe stored, partially or fully, on a memory device of the executingcomputing device, for execution by the computing device. Softwareinstructions may be embedded in firmware, such as an EPROM. It will befurther appreciated that hardware modules may be comprised of connectedlogic units, such as gates and flip-flops, and/or may be comprised ofprogrammable units, such as programmable gate arrays or processors. Themodules or computing device functionality described herein arepreferably implemented as software modules, but may be represented inhardware or firmware. Generally, the modules described herein refer tological modules that may be combined with other modules or divided intosub-modules despite their physical organization or storage.

The computer system 600 may implement the techniques described hereinusing customized hard-wired logic, one or more ASICs or FPGAs, firmwareand/or program logic which in combination with the computer systemcauses or programs computer system 600 to be a special-purpose machine.According to one embodiment, the techniques herein are performed bycomputer system 600 in response to processor(s) 604 executing one ormore sequences of one or more instructions contained in main memory 606.Such instructions may be read into main memory 606 from another storagemedium, such as storage device 610. Execution of the sequences ofinstructions contained in main memory 606 causes processor(s) 604 toperform the process steps described herein. In alternative embodiments,hard-wired circuitry may be used in place of or in combination withsoftware instructions.

The term “non-transitory media,” and similar terms, as used hereinrefers to any media that store data and/or instructions that cause amachine to operate in a specific fashion. Such non-transitory media maycomprise non-volatile media and/or volatile media. Non-volatile mediaincludes, for example, optical or magnetic disks, such as storage device610. Volatile media includes dynamic memory, such as main memory 606.Common forms of non-transitory media include, for example, a floppydisk, a flexible disk, hard disk, solid state drive, magnetic tape, orany other magnetic data storage medium, a CD-ROM, any other optical datastorage medium, any physical medium with patterns of holes, a RAM, aPROM, and EPROM, a FLASH-EPROM, NVRAM, any other memory chip orcartridge, and networked versions of the same.

Non-transitory media is distinct from but may be used in conjunctionwith transmission media. Transmission media participates in transferringinformation between non-transitory media. For example, transmissionmedia includes coaxial cables, copper wire and fiber optics, includingthe wires that comprise bus 602. Transmission media can also take theform of acoustic or light waves, such as those generated duringradio-wave and infra-red data communications.

Various forms of media may be involved in carrying one or more sequencesof one or more instructions to processor 604 for execution. For example,the instructions may initially be carried on a magnetic disk or solidstate drive of a remote computer. The remote computer can load theinstructions into its dynamic memory and send the instructions over atelephone line using a modem. A modem local to computer system 600 canreceive the data on the telephone line and use an infra-red transmitterto convert the data to an infra-red signal. An infra-red detector canreceive the data carried in the infra-red signal and appropriatecircuitry can place the data on bus 602. Bus 602 carries the data tomain memory 606, from which processor 604 retrieves and executes theinstructions. The instructions received by main memory 606 mayoptionally be stored on storage device 610 either before or afterexecution by processor 604.

The computer system 600 also includes a communication interface 618coupled to bus 602. Communication interface 618 provides a two-way datacommunication coupling to one or more network links that are connectedto one or more local networks. For example, communication interface 618may be an integrated services digital network (ISDN) card, cable modem,satellite modem, or a modem to provide a data communication connectionto a corresponding type of telephone line. As another example,communication interface 618 may be a local area network (LAN) card toprovide a data communication connection to a compatible LAN (or WANcomponent to communicated with a WAN). Wireless links may also beimplemented. In any such implementation, communication interface 618sends and receives electrical, electromagnetic or optical signals thatcarry digital data streams representing various types of information.

A network link typically provides data communication through one or morenetworks to other data devices. For example, a network link may providea connection through local network to a host computer or to dataequipment operated by an Internet Service Provider (ISP). The ISP inturn provides data communication services through the world wide packetdata communication network now commonly referred to as the “Internet”.Local network and Internet both use electrical, electromagnetic oroptical signals that carry digital data streams. The signals through thevarious networks and the signals on network link and throughcommunication interface 618, which carry the digital data to and fromcomputer system 600, are example forms of transmission media.

The computer system 600 can send messages and receive data, includingprogram code, through the network(s), network link and communicationinterface 618. In the Internet example, a server might transmit arequested code for an application program through the Internet, the ISP,the local network and the communication interface 618.

The received code may be executed by processor 604 as it is received,and/or stored in storage device 610, or other non-volatile storage forlater execution.

Each of the processes, methods, and algorithms described in thepreceding sections may be embodied in, and fully or partially automatedby, code modules executed by one or more computer systems or computerprocessors comprising computer hardware. The processes and algorithmsmay be implemented partially or wholly in application-specificcircuitry.

The various features and processes described above may be usedindependently of one another, or may be combined in various ways. Allpossible combinations and sub-combinations are intended to fall withinthe scope of this disclosure. In addition, certain method or processblocks may be omitted in some implementations. The methods and processesdescribed herein are also not limited to any particular sequence, andthe blocks or states relating thereto can be performed in othersequences that are appropriate. For example, described blocks or statesmay be performed in an order other than that specifically disclosed, ormultiple blocks or states may be combined in a single block or state.The example blocks or states may be performed in serial, in parallel, orin some other manner. Blocks or states may be added to or removed fromthe disclosed example embodiments. The example systems and componentsdescribed herein may be configured differently than described. Forexample, elements may be added to, removed from, or rearranged comparedto the disclosed example embodiments.

Conditional language, such as, among others, “can,” “could,” “might,” or“may,” unless specifically stated otherwise, or otherwise understoodwithin the context as used, is generally intended to convey that certainembodiments include, while other embodiments do not include, certainfeatures, elements and/or steps. Thus, such conditional language is notgenerally intended to imply that features, elements and/or steps are inany way required for one or more embodiments or that one or moreembodiments necessarily include logic for deciding, with or without userinput or prompting, whether these features, elements and/or steps areincluded or are to be performed in any particular embodiment.

Any process descriptions, elements, or blocks in the flow diagramsdescribed herein and/or depicted in the attached figures should beunderstood as potentially representing modules, segments, or portions ofcode which include one or more executable instructions for implementingspecific logical functions or steps in the process. Alternateimplementations are included within the scope of the embodimentsdescribed herein in which elements or functions may be deleted, executedout of order from that shown or discussed, including substantiallyconcurrently or in reverse order, depending on the functionalityinvolved, as would be understood by those skilled in the art.

It should be emphasized that many variations and modifications may bemade to the above-described embodiments, the elements of which are to beunderstood as being among other acceptable examples. All suchmodifications and variations are intended to be included herein withinthe scope of this disclosure. The foregoing description details certainembodiments of the invention. It will be appreciated, however, that nomatter how detailed the foregoing appears in text, the invention can bepracticed in many ways. As is also stated above, it should be noted thatthe use of particular terminology when describing certain features oraspects of the invention should not be taken to imply that theterminology is being re-defined herein to be restricted to including anyspecific characteristics of the features or aspects of the inventionwith which that terminology is associated. The scope of the inventionshould therefore be construed in accordance with the appended claims andany equivalents thereof.

Engines, Components, and Logic

Certain embodiments are described herein as including logic or a numberof components, engines, or mechanisms. Engines may constitute eithersoftware engines (e.g., code embodied on a machine-readable medium) orhardware engines. A “hardware engine” is a tangible unit capable ofperforming certain operations and may be configured or arranged in acertain physical manner. In various example embodiments, one or morecomputer systems (e.g., a standalone computer system, a client computersystem, or a server computer system) or one or more hardware engines ofa computer system (e.g., a processor or a group of processors) may beconfigured by software (e.g., an application or application portion) asa hardware engine that operates to perform certain operations asdescribed herein.

In some embodiments, a hardware engine may be implemented mechanically,electronically, or any suitable combination thereof. For example, ahardware engine may include dedicated circuitry or logic that ispermanently configured to perform certain operations. For example, ahardware engine may be a special-purpose processor, such as aField-Programmable Gate Array (FPGA) or an Application SpecificIntegrated Circuit (ASIC). A hardware engine may also includeprogrammable logic or circuitry that is temporarily configured bysoftware to perform certain operations. For example, a hardware enginemay include software executed by a general-purpose processor or otherprogrammable processor. Once configured by such software, hardwareengines become specific machines (or specific components of a machine)uniquely tailored to perform the configured functions and are no longergeneral-purpose processors. It will be appreciated that the decision toimplement a hardware engine mechanically, in dedicated and permanentlyconfigured circuitry, or in temporarily configured circuitry (e.g.,configured by software) may be driven by cost and time considerations.

Accordingly, the phrase “hardware engine” should be understood toencompass a tangible entity, be that an entity that is physicallyconstructed, permanently configured (e.g., hardwired), or temporarilyconfigured (e.g., programmed) to operate in a certain manner or toperform certain operations described herein. As used herein,“hardware-implemented engine” refers to a hardware engine. Consideringembodiments in which hardware engines are temporarily configured (e.g.,programmed), each of the hardware engines need not be configured orinstantiated at any one instance in time. For example, where a hardwareengine comprises a general-purpose processor configured by software tobecome a special-purpose processor, the general-purpose processor may beconfigured as respectively different special-purpose processors (e.g.,comprising different hardware engines) at different times. Softwareaccordingly configures a particular processor or processors, forexample, to constitute a particular hardware engine at one instance oftime and to constitute a different hardware engine at a differentinstance of time.

Hardware engines can provide information to, and receive informationfrom, other hardware engines. Accordingly, the described hardwareengines may be regarded as being communicatively coupled. Where multiplehardware engines exist contemporaneously, communications may be achievedthrough signal transmission (e.g., over appropriate circuits and buses)between or among two or more of the hardware engines. In embodiments inwhich multiple hardware engines are configured or instantiated atdifferent times, communications between such hardware engines may beachieved, for example, through the storage and retrieval of informationin memory structures to which the multiple hardware engines have access.For example, one hardware engine may perform an operation and store theoutput of that operation in a memory device to which it iscommunicatively coupled. A further hardware engine may then, at a latertime, access the memory device to retrieve and process the storedoutput. Hardware engines may also initiate communications with input oroutput devices, and can operate on a resource (e.g., a collection ofinformation).

The various operations of example methods described herein may beperformed, at least partially, by one or more processors that aretemporarily configured (e.g., by software) or permanently configured toperform the relevant operations. Whether temporarily or permanentlyconfigured, such processors may constitute processor-implemented enginesthat operate to perform one or more operations or functions describedherein. As used herein, “processor-implemented engine” refers to ahardware engine implemented using one or more processors.

Similarly, the methods described herein may be at least partiallyprocessor-implemented, with a particular processor or processors beingan example of hardware. For example, at least some of the operations ofa method may be performed by one or more processors orprocessor-implemented engines. Moreover, the one or more processors mayalso operate to support performance of the relevant operations in a“cloud computing” environment or as a “software as a service” (SaaS).For example, at least some of the operations may be performed by a groupof computers (as examples of machines including processors), with theseoperations being accessible via a network (e.g., the Internet) and viaone or more appropriate interfaces (e.g., an Application ProgramInterface (API)).

The performance of certain of the operations may be distributed amongthe processors, not only residing within a single machine, but deployedacross a number of machines. In some example embodiments, the processorsor processor-implemented engines may be located in a single geographiclocation (e.g., within a home environment, an office environment, or aserver farm). In other example embodiments, the processors orprocessor-implemented engines may be distributed across a number ofgeographic locations.

Language

Throughout this specification, plural instances may implementcomponents, operations, or structures described as a single instance.Although individual operations of one or more methods are illustratedand described as separate operations, one or more of the individualoperations may be performed concurrently, and nothing requires that theoperations be performed in the order illustrated. Structures andfunctionality presented as separate components in example configurationsmay be implemented as a combined structure or component. Similarly,structures and functionality presented as a single component may beimplemented as separate components. These and other variations,modifications, additions, and improvements fall within the scope of thesubject matter herein.

Although an overview of the subject matter has been described withreference to specific example embodiments, various modifications andchanges may be made to these embodiments without departing from thebroader scope of embodiments of the present disclosure. Such embodimentsof the subject matter may be referred to herein, individually orcollectively, by the term “invention” merely for convenience and withoutintending to voluntarily limit the scope of this application to anysingle disclosure or concept if more than one is, in fact, disclosed.

The embodiments illustrated herein are described in sufficient detail toenable those skilled in the art to practice the teachings disclosed.Other embodiments may be used and derived therefrom, such thatstructural and logical substitutions and changes may be made withoutdeparting from the scope of this disclosure. The Detailed Description,therefore, is not to be taken in a limiting sense, and the scope ofvarious embodiments is defined only by the appended claims, along withthe full range of equivalents to which such claims are entitled.

It will be appreciated that an “engine,” “system,” “data store,” and/or“database” may comprise software, hardware, firmware, and/or circuitry.In one example, one or more software programs comprising instructionscapable of being executable by a processor may perform one or more ofthe functions of the engines, data stores, databases, or systemsdescribed herein. In another example, circuitry may perform the same orsimilar functions. Alternative embodiments may comprise more, less, orfunctionally equivalent engines, systems, data stores, or databases, andstill be within the scope of present embodiments. For example, thefunctionality of the various systems, engines, data stores, and/ordatabases may be combined or divided differently.

“Open source” software is defined herein to be source code that allowsdistribution as source code as well as compiled form, with awell-publicized and indexed means of obtaining the source, optionallywith a license that allows modifications and derived works.

The data stores described herein may be any suitable structure (e.g., anactive database, a relational database, a self-referential database, atable, a matrix, an array, a flat file, a documented-oriented storagesystem, a non-relational No-SQL system, and the like), and may becloud-based or otherwise.

As used herein, the term “or” may be construed in either an inclusive orexclusive sense. Moreover, plural instances may be provided forresources, operations, or structures described herein as a singleinstance. Additionally, boundaries between various resources,operations, engines, engines, and data stores are somewhat arbitrary,and particular operations are illustrated in a context of specificillustrative configurations. Other allocations of functionality areenvisioned and may fall within a scope of various embodiments of thepresent disclosure. In general, structures and functionality presentedas separate resources in the example configurations may be implementedas a combined structure or resource. Similarly, structures andfunctionality presented as a single resource may be implemented asseparate resources. These and other variations, modifications,additions, and improvements fall within a scope of embodiments of thepresent disclosure as represented by the appended claims. Thespecification and drawings are, accordingly, to be regarded in anillustrative rather than a restrictive sense.

Conditional language, such as, among others, “can,” “could,” “might,” or“may,” unless specifically stated otherwise, or otherwise understoodwithin the context as used, is generally intended to convey that certainembodiments include, while other embodiments do not include, certainfeatures, elements and/or steps. Thus, such conditional language is notgenerally intended to imply that features, elements and/or steps are inany way required for one or more embodiments or that one or moreembodiments necessarily include logic for deciding, with or without userinput or prompting, whether these features, elements and/or steps areincluded or are to be performed in any particular embodiment.

Although the invention has been described in detail for the purpose ofillustration based on what is currently considered to be the mostpractical and preferred implementations, it is to be understood thatsuch detail is solely for that purpose and that the invention is notlimited to the disclosed implementations, but, on the contrary, isintended to cover modifications and equivalent arrangements that arewithin the spirit and scope of the appended claims. For example, it isto be understood that the present invention contemplates that, to theextent possible, one or more features of any embodiment can be combinedwith one or more features of any other embodiment.

The invention claimed is:
 1. A method being implemented by a computingsystem including one or more physical processors and storage mediastoring machine-readable instructions, the method comprising: obtaining,by the computing system, a software program; obtaining, by the computingsystem, a first software package that is separately executable from thesoftware program; obtaining, by the computing system, a second softwarepackage that is separately executable from the software program;generating, by the computing system, a composite software program atleast in part by amalgamating the first software package and the secondsoftware package into the software program; receiving, by the computingsystem, and during execution of the software program in a first process,an invocation signal; determining, by the computing system, that theinvocation signal corresponds to the amalgamated first software package;invoking the amalgamated first software package in a second process thatis different from the first process to avoid impacting execution of thesoftware program in the first process; determining that each of thefirst software package and the second software package import a thirdsoftware package that utilizes one or more global state variables; andgenerating a first copy of the third software package for use by thefirst software package and a second copy of the third software packagefor use by the second software package.
 2. The method of claim 1,wherein invoking the amalgamated first software package comprisesinvoking and executing functionality of the first software packagewithout having to separately call or generate a standalone executablefor the first software package.
 3. The method of claim 2, whereinexecution of the functionality of the first software package in thesecond process appears to the first software package as execution as thestandalone executable.
 4. The method of claim 1, wherein amalgamatingthe first software package into the software program comprises:incorporating the first software package into the software program,wherein incorporating the first software package into the softwareprogram comprises rewriting source code of the first software package asa callable library; generating an invocation mechanism for calling thecallable library; and embedding the invocation mechanism in thecomposite software program.
 5. The method of claim 4, wherein rewritingthe source code of the first software package as the callable librarycomprises rewriting a main function of the first software package as apublicly-callable library.
 6. The method of claim 1, whereinmodifications to the one or more global state variables in the firstcopy do not affect the one or more global state variables in the secondcopy.
 7. The method of claim 1, further comprising: rewriting sourcecode of the amalgamated first software package to use the first copy;and rewriting source code of the amalgamated second software package touse the second copy.
 8. The method of claim 1, wherein the generating ofthe composite software program comprises converting the software programinto a library file that embeds each of the amalgamated first softwarepackage and the amalgamated second software package.
 9. The method ofclaim 8, wherein the library file shields a state of the amalgamatedfirst software package from the amalgamated second software package andthe library file shields a state of the amalgamated second softwarepackage from the amalgamated first software package.
 10. A systemcomprising: one or more processors; and memory storing instructionsthat, when executed by the one or more processors, cause the system toperform: obtaining a software program; obtaining a first softwarepackage that is separately executable from the software program;obtaining a second software package that is separately executable fromthe software program; generating a composite software program at leastin part by amalgamating the first software package and the secondsoftware package into the software program; receiving, during executionof the software program in a first process, an invocation signal;determining that the invocation signal corresponds to the amalgamatedfirst software package; invoking the amalgamated first software packagein a second process that is different from the first process to avoidimpacting execution of the software program in the first process;determining that each of the first software package and the secondsoftware package import a third software package that utilizes one ormore global state variables; and generating a first copy of the thirdsoftware package for use by the first software package and a second copyof the third software package for use by the second software package.11. The system of claim 10, wherein invoking the amalgamated firstsoftware package comprises invoking and executing functionality of thefirst software package without having to separately call or generate astandalone executable for the first software package.
 12. The system ofclaim 11, wherein execution of the functionality of the first softwarepackage in the second process appears to the first software package asexecution as the standalone executable.
 13. The system of claim 10,wherein amalgamating the first software package into the softwareprogram comprises: incorporating the first software package into thesoftware program, wherein incorporating the first software package intothe software program comprises rewriting source code of the firstsoftware package as a callable library; generating an invocationmechanism for calling the callable library; and embedding the invocationmechanism in the composite software program.
 14. The system of claim 13,wherein rewriting the source code of the first software package as thecallable library comprises rewriting a main function of the firstsoftware package as a publicly-callable library.
 15. The system of claim10, wherein modifications to the one or more global state variables inthe first copy do not affect the one or more global state variables inthe second copy.
 16. The system of claim 10, wherein the instructions,when executed, further cause the one or more processors to perform:rewriting source code of the amalgamated first software package to usethe first copy; and rewriting source code of the amalgamated secondsoftware package to use the second copy.
 17. The system of claim 10,wherein the generating of the composite software program comprisesconverting the software program into a library file that embeds each ofthe amalgamated first software package and the amalgamated secondsoftware package.
 18. The system of claim 17, wherein the library fileshields a state of the amalgamated first software package from theamalgamated second software package and the library file shields a stateof the amalgamated second software package from the amalgamated firstsoftware package.